var myChart;
let baseUrl = "http://43.154.53.144:8080/stock2c1/";

// post请求封装
function post(url, data, header) {
  return new Promise((resolve, reject) => {
    axios({
      headers: {
        "Content-Type": "application/x-www-form-urlencoded",
        Authorization: header,
      },
      method: "post",
      url: baseUrl + url,
      data,
    })
      .then((res) => {
        if (res.data.code == 200) {
          resolve(res.data);
        } else {
          reject();
          alertError("请求超时");
        }
      })
      .catch((err) => {
        alertError("请求超时");
      });
  });
}
